:root {
    --primary: #1976D2;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --bg-white: #ffffff;
    --bg-gray: #f5f7fa;
    --text: #333333;
    --text-light: #666666;
    --border: #dee2e6;
    --border-radius: 8px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: var(--text);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    height: 100vh;
    overflow: hidden;
}

/* 侧边栏样式 - 固定定位 */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 250px;
    height: 100vh;
    background: var(--secondary);
    color: white;
    transition: all 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h2 {
    font-size: 22px;
    margin-top: 10px;
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s;
}

.menu-item:hover, .menu-item.active {
    background: rgba(0, 0, 0, 0.2);
    color: white;
    border-left: 4px solid var(--primary);
}

.menu-item i {
    margin-right: 10px;
    font-size: 18px;
}

/* 主内容区域 */
.main-content {
    margin-left: 250px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部导航 - 固定定位 */
.top-nav {
    position: fixed;
    left: 250px;
    top: 0;
    right: 0;
    background: white;
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    z-index: 900;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--light);
    border-radius: 4px;
    padding: 8px 15px;
    width: 300px;
}

.search-box input {
    border: none;
    background: transparent;
    margin-left: 10px;
    width: 100%;
    outline: none;
}

.user-profile {
    display: flex;
    align-items: center;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

/* 个人资料页面头像样式 */
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* 编辑页面头像样式 */
.edit-avatar {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    object-fit: cover;
}

/* 列表页面小头像样式 */
.list-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* 内容区域 - 可滚动 */
.content {
    margin-top: 70px;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

/* 头部操作区域 */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card {
    display: flex;
    align-items: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 15px;
}

.bg-primary { background: var(--primary); color: white; }
.bg-success { background: var(--success); color: white; }
.bg-warning { background: var(--warning); color: white; }
.bg-danger { background: var(--danger); color: white; }

.stat-info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--text-light);
    font-size: 14px;
}

.section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    min-width: 100%;
    margin-bottom: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.data-table th {
    background-color: var(--light);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text);
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: var(--light);
}

/* 搜索容器样式 */
.search-container {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.search-info {
    color: var(--text-light);
    font-size: 14px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition);
    background-color: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* 按钮样式 */
.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #1565C0;
}


.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-default {
    background-color: var(--light);
    color: var(--text);
}

.btn-default:hover {
    background-color: #e9ecef;
}

.btn-edit {
    background: var(--warning);
    color: white;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* 分页样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.pagination {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    background-color: var(--bg-white);
}

.pagination-link:hover {
    background-color: var(--light);
    border-color: var(--primary);
}

.pagination-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    color: var(--text-light);
    font-size: 14px;
}

/* 状态标签 */
.status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-normal {
    background-color: #d4edda;
    color: #155724;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

.status-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.status-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-published {
    background: #e6f7ee;
    color: var(--success);
}

.status-draft {
    background: #fef5e6;
    color: var(--warning);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 90%;
    max-width: 500px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: var(--text-light);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close:hover {
    color: var(--text);
}

/* 消息提示 */
.message {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    border-left: 4px solid transparent;
}

.success-message {
    background-color: rgba(46, 204, 113, 0.1);
    color: var(--success);
    border-color: var(--success);
}

.error-message {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* 工具提示 */
.help-text {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 10px;
    }
    
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-group {
        flex-wrap: wrap;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
}



.editor {
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 15px;
    min-height: 300px;
    background: white;
}

.editor-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.editor-toolbar button {
    padding: 8px 12px;
    background: var(--light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .sidebar {
        width: 70px;
    }

    .main-content {
        margin-left: 70px;
    }

    .top-nav {
        left: 70px;
    }

    .sidebar-header h2, .menu-item span {
        display: none;
    }

    .menu-item {
        justify-content: center;
        padding: 15px;
    }

    .menu-item i {
        margin-right: 0;
        font-size: 20px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }

    .search-box {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
    }

    .top-nav {
        left: 0;
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .search-box {
        width: 100%;
        margin: 10px 0;
    }

    .content {
        margin-top: 120px; /* 调整为适应增高的顶部导航 */
        height: calc(100vh - 120px);
    }
}